Fix treadmill pause watts and Stryd steps - #4803
Draft
cagnulein wants to merge 7 commits into
Draft
Conversation
cagnulein
force-pushed
the
codex/4480-stryd-steps-fix
branch
from
July 12, 2026 05:37
5bb87a2 to
fc767d8
Compare
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Stryd 5 pods broadcast a power value that already compensates for the treadmill incline on their own, even when no incline is entered in the Stryd app. This conflicts with QZ's own inclination gain formula and makes the reported power unreliable when running on an incline. BLE sniffing (thanks @AndreaPro) found that writing 15 00 to the proprietary characteristic 7e78aa18-72cd-d3b8-a81f-5b7e589bea0f puts the pod into Indoor mode, where it stops adjusting power for incline on its own, leaving QZ's own formula as the only source of the correction. The pod resets to Outdoor mode automatically on disconnect, so no cleanup is needed on our side. Refs #4480
Andrea found (via BLE sniffing) that the Stryd5 pod acknowledges the 15 00/15 01 mode write on characteristic 7e78aa19, echoing the confirmed mode back in byte 2. Track that ack and resend the Indoor mode request (up to 3 times, 1s apart) if it's not received, in case the initial write is missed or the pod boots into Outdoor mode. Refs #4480
The mode-switch write was targeting 7e78aa18, which is the service UUID, not a characteristic UUID - the service only exposes two characteristics, 7e78aa20 (write, handle 33) and 7e78aa19 (notify, handle 35), confirmed from Andrea's GATT discovery log. The write never matched any characteristic, so the mode switch silently never fired. Target 7e78aa20 instead. Refs #4480
…eps-fix # Conflicts: # src/qzsettings.cpp # src/settings-catalog.json # src/settings.qml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #4480.
This PR fixes treadmill-side issues found while analyzing the Stryd logs attached to issue #4480:
instant_power_on_pauseis enabledinstant_power_on_pauseis enabled, instead of using 3s/5s averaged watts that can be empty while metrics are pausedRoot cause
treadmill::update_metrics()had its own paused handling and did not honorinstant_power_on_pause, so watts could be reset to zero while paused even though the global setting was enabled.The template watt value uses
wattsMetricforUI(). Withpower_avg_3senabled, that path reads the harmonic average buffer. While paused,metric::setValue()updates the raw value but does not populate the average buffers, so templates could showwatts: 0even though the current watt value andkgwattswere nonzero.The external cadence path
treadmill::cadenceSensor()only updatedCadence; unlike other cadence update paths, it did not callevaluateStepCount(), so Stryd cadence did not feed the step counter.The Stryd/treadmill speed correction threshold was hardcoded at 20%, which made it hard to test whether a wider threshold improves HR PID behavior when Stryd speed and treadmill raw speed differ.
Validation
git diff --checkNo runtime device test was run locally.